<template>
	<view>
		<view  style="background-color: #05052B;display: flex;justify-content: start;">
			<view >
				<image style="width: 120upx;height: 120upx;border-radius: 60upx;margin: 40upx;" :src="res.avatar || '../../../static/001.png'" mode=""></image>
			</view>
			<view  style="color: #fff;margin: 20upx;">
				<view >{{res.nickname}}</view>
				<view v-if="res.up">推荐人 : {{res.up.nickname}}</view>
				<view >我的等级 : {{res.levelname}}</view>
				<!-- <view >报单档位 : {{res.dang}}</view> -->
			</view>
		</view>
		<view  style="background-color: #fff;display: flex;flex-direction: column; margin-top: 20upx;">
			<!-- <view  style="border-bottom: 2upx solid #f3f3f3;width: 100%;height: 150upx;padding: 30upx;">
				<view  style="color: #F1832D;font-size: 38upx;">
					{{res.income}}
				</view>
				<view >
					我的收益(元)
				</view>
			</view> -->
			<view  style="border-bottom: 2upx solid #f3f3f3;width: 90%;height: 150upx;padding: 30upx;display: flex;justify-content: space-between;">
				<view >
					<view  style="color: #05052B;font-size: 38upx;">
						{{res.credit2}}
					</view>
					<view >
						可提现金额(元)
					</view>
				</view>
				<view >
					<button type="default" style="width: 180upx;height: 60upx;background-color: #05052B;border-radius: 30upx;color: #fff;font-size: 28upx;margin-top: 20upx;text-align: center;line-height: 60upx;" @click="jump" data-src="../../member/details/tx/tx">立即提现</button>
				</view>
			</view>
		</view>
		<view  style="background-color: #fff;margin-top: 20upx;">
			<!-- <view  style="display: flex;padding: 30upx;border-bottom: 1upx solid #ccc;">
				<view  style="width: 50%;display: flex;">
					<view >
						<image style="width: 60upx;height: 60upx;" src="../../../static/shouyi-1.png" mode=""></image>
					</view>
					<view  style="margin-top: -20upx;margin-left: 30upx;">
						<view >
							我的收益
						</view>
						<view  style="color:#A6A4A8 ;">
							{{res.credit2}}元
						</view>
					</view>
				</view>
				<view  style="width: 50%;display: flex;">
					<view >
						<image style="width: 80upx;margin-top: 8upx;" src="../../../static/tixian4.png" mode="widthFix"></image>
					</view>
					<view  style="margin-left: 30upx;">
						<view>
							收益明细
						</view>
					</view>
				</view>
			</view> -->
			<view  style="display: flex;padding: 30upx;border-bottom: 1upx solid #ccc;height: 80upx;">
				<view  style="width: 52%;display: flex;">
					<view >
						<image style="width: 80upx;margin-top: 8upx;" src="../../../static/tixian4.png" mode="widthFix"></image>
					</view>
					<view  style="margin-left: 30upx;">
						<view >
							收益明细
						</view>
					</view>
				</view>
				<view  style="width: 48%;display: flex;">
					<view >
						<image style="width: 60upx;" src="../../../static/tuandui.png" mode="widthFix"></image>
					</view>
					<view  style="margin-left: 30upx;" @click="jump" data-src="../../member/acommsion/projcommision/myteam">
						<view >
							我的团队
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				res:[],
			}
		},
		onLoad:function(){
			uni.showLoading()
			uni.getStorage({
				key: 'openid',
				success: (res) => {
					this.openid = res.data
					this.getdata()
				},
				fail: () => {
					uni.navigateTo({
						url: '../login/login'
					});
				}
			});
		},
		methods: {
			getdata(){
				uni.request({
					url:this.$BASE_URL+'/index.php?i=2&c=entry&m=ewei_shopv2&do=mobile&r=member.vip&app=1',
					method: 'POST',
						data: {'openid':this.openid},
						header:{'Content-Type':'application/x-www-form-urlencoded'},
						success: res => {
							uni.hideLoading()
							console.log(res)
							this.res = res.data
						},
						fail: () => {},
						complete: () => {}
					});
					
			
			},
			jump(e){
				uni.navigateTo({
					url:e.currentTarget.dataset.src
				})
			},
		}
	}
</script>

<style>

</style>

